import java.util.ArrayList;

public class textBased {
	private Board properties;
	private Player[] player;
	private int numberOfPlayer=0;
	
	
	public textBased(){
		setProperties(new Board());
	}
	
	public void createPlayers(int noPlayers, ArrayList<String> names){
		numberOfPlayer = noPlayers;
		setPlayer(new Player[numberOfPlayer]);
		for(int i=0;i<getPlayer().length;i++){
			getPlayer()[i] = new Player();
			getPlayer()[i].setName(String.valueOf(names.get(i)));
			getPlayer()[i].setMoney(15000000);
		}
	}
	
	public void chooseToken(ArrayList<Integer> tokens){
		int chosen=0;
		for(int i=0;i<getPlayer().length;i++){
			chosen = tokens.get(i)+1;
			switch(chosen){
				case 1:
					getPlayer()[i].createToken("Naruto", 1);
					break;
				case 2:
					getPlayer()[i].createToken("Sasuke", 2);
					break;
				case 3:
					getPlayer()[i].createToken("Sakura", 3);
					break;
				case 4:
					getPlayer()[i].createToken("Orochimaru", 4);
					break;
				case 5:
					getPlayer()[i].createToken("Hinata", 5);
					break;
				case 6:
					getPlayer()[i].createToken("Kakashi", 6);
						break;
				case 7:
					getPlayer()[i].createToken("Neji", 7);
					break;
				case 8:
					getPlayer()[i].createToken("Itachi", 8);
					break;
			}
		}
	}

	public void setPlayer(Player[] player) {
		this.player = player;
	}

	public Player[] getPlayer() {
		return player;
	}

	public void setProperties(Board properties) {
		this.properties = properties;
	}

	public Board getProperties() {
		return properties;
	}
}
